home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / gtlayout / source / gtlayout.h < prev    next >
C/C++ Source or Header  |  1999-04-19  |  21KB  |  687 lines

  1. /*
  2. **    $VER: gtlayout.h 45.1 (3.7.98)
  3. **    GadTools layout toolkit
  4. **
  5. **    Copyright © 1993-1998 by Olaf `Olsen' Barthel
  6. **        Freely distributable.
  7. */
  8.  
  9. #ifndef _GTLAYOUT_H
  10. #define _GTLAYOUT_H
  11.  
  12.  
  13. /*****************************************************************************/
  14.  
  15.  
  16. #ifndef INTUITION_GADGETCLASS_H
  17. #include <intuition/gadgetclass.h>
  18. #endif    /* !INTUITION_GADGETCLASS_H */
  19.  
  20. #ifndef LIBRARIES_GADTOOLS_H
  21. #include <libraries/gadtools.h>
  22. #endif    /* !LIBRARIES_GADTOOLS_H */
  23.  
  24.  
  25. /*****************************************************************************/
  26.  
  27.  
  28. /* Kinds of objects supported in addition to the normal GadTools kinds */
  29. #define HORIZONTAL_KIND    45
  30. #define VERTICAL_KIND    46
  31. #define END_KIND    47
  32. #define FRAME_KIND    48
  33. #define BOX_KIND    49
  34. #define FRACTION_KIND    50
  35. #define XBAR_KIND    51
  36. #define YBAR_KIND    52
  37. #define PASSWORD_KIND    53
  38. #define GAUGE_KIND    54
  39. #define TAPEDECK_KIND    55
  40. #define LEVEL_KIND    56
  41. #define BOOPSI_KIND    57
  42. #define POPUP_KIND    58
  43. #define TAB_KIND    59
  44. #define BLANK_KIND    60
  45. #define IMAGE_KIND    61
  46.  
  47.  
  48. /*****************************************************************************/
  49.  
  50.  
  51. /* Where to place a gadget label */
  52. enum
  53. {
  54.     PLACE_Left,
  55.     PLACE_Right,
  56.     PLACE_Above,
  57.     PLACE_In,
  58.     PLACE_Below
  59. };
  60.  
  61. /* How to align text lines in BOX_KIND gadgets */
  62. enum
  63. {
  64.     ALIGNTEXT_Left,
  65.     ALIGNTEXT_Centered,
  66.     ALIGNTEXT_Right,
  67.     ALIGNTEXT_Pad
  68. };
  69.  
  70. /* The button images available for TAPEDECK_KIND gadgets. */
  71. enum
  72. {
  73.     TDBT_Backward,
  74.     TDBT_Forward,
  75.     TDBT_Previous,
  76.     TDBT_Next,
  77.     TDBT_Stop,
  78.     TDBT_Pause,
  79.     TDBT_Record,
  80.     TDBT_Rewind,
  81.     TDBT_Eject,
  82.     TDBT_Play,
  83.  
  84.     TDBTLAST
  85. };
  86.  
  87. /* The frame types for groups. */
  88. enum
  89. {
  90.     FRAMETYPE_None,
  91.     FRAMETYPE_Label,
  92.     FRAMETYPE_Tab
  93. };
  94.  
  95. /* How to align the window opened by LT_Build() on the screen. */
  96. #define ALIGNF_Right        (1 << 0)
  97. #define ALIGNF_Left        (1 << 1)
  98. #define ALIGNF_Top        (1 << 2)
  99. #define ALIGNF_Bottom        (1 << 3)
  100. #define ALIGNF_ExtraRight    (1 << 4)
  101. #define ALIGNF_ExtraLeft    (1 << 5)
  102. #define ALIGNF_ExtraTop        (1 << 6)
  103. #define ALIGNF_ExtraBottom    (1 << 7)
  104.  
  105.  
  106. /*****************************************************************************/
  107.  
  108.  
  109. /* Generic tags, applicable for several object types */
  110. #define LA_Chars        TAG_USER+2
  111. #define LA_LabelPlace        TAG_USER+3
  112. #define LA_ExtraSpace        TAG_USER+4
  113. #define LA_NoKey        TAG_USER+30
  114. #define LA_HighLabel        TAG_USER+31
  115. #define LA_LabelText        TAG_USER+37
  116. #define LA_LabelID        TAG_USER+38
  117. #define LA_ID            TAG_USER+39
  118. #define LA_Type            TAG_USER+40
  119. #define LA_PageSelector        TAG_USER+79
  120. #define LA_LabelChars        TAG_USER+107
  121. #define LA_DefaultSize        TAG_USER+170
  122. #define LA_LayoutSpace        TAG_USER+189
  123.  
  124. /* Storage type tags */
  125. #define LA_BYTE            TAG_USER+63
  126. #define LA_UBYTE        TAG_USER+64
  127. #define LA_WORD            TAG_USER+65
  128. #define LA_BOOL            TAG_USER+65
  129. #define LA_UWORD        TAG_USER+66
  130. #define LA_LONG            TAG_USER+67
  131. #define LA_ULONG        TAG_USER+68
  132. #define LA_STRPTR        TAG_USER+69
  133.  
  134. /* for use with LT_GetAttributes() only */
  135. #define LA_Left            TAG_USER+16
  136. #define LA_Top            TAG_USER+17
  137. #define LA_Width        TAG_USER+18
  138. #define LA_Height        TAG_USER+19
  139. #define LA_LabelLeft        TAG_USER+114
  140. #define LA_LabelTop        TAG_USER+115
  141.  
  142. /* BOOPSI_KIND */
  143. #define LABO_TagCurrent        TAG_USER+119
  144. #define LABO_TagTextAttr    TAG_USER+120
  145. #define LABO_TagDrawInfo    TAG_USER+121
  146. #define LABO_TagLink        TAG_USER+129
  147. #define LABO_TagScreen        TAG_USER+132
  148. #define LABO_Link        LALV_Link
  149. #define LABO_ClassInstance    TAG_USER+122
  150. #define LABO_ClassName        TAG_USER+123
  151. #define LABO_ClassLibraryName    TAG_USER+124
  152. #define LABO_ExactWidth        TAG_USER+127
  153. #define LABO_ExactHeight    TAG_USER+128
  154. #define LABO_RelFontHeight    TAG_USER+131
  155. #define LABO_Object        TAG_USER+133
  156. #define LABO_FullWidth        TAG_USER+135
  157. #define LABO_FullHeight        TAG_USER+136
  158. #define LABO_ActivateHook    TAG_USER+141
  159.  
  160. /* BOX_KIND */
  161. #define LABX_Labels        TAG_USER+12
  162. #define LABX_Lines        TAG_USER+13
  163. #define LABX_Chars        TAG_USER+2
  164. #define LABX_Rows        TAG_USER+1
  165. #define LABX_Index        TAG_USER+14
  166. #define LABX_Text        TAG_USER+15
  167. #define LABX_AlignText        TAG_USER+27
  168. #define LABX_DrawBox        TAG_USER+11
  169. #define LABX_FirstLabel        TAG_USER+44
  170. #define LABX_LastLabel        TAG_USER+45
  171. #define LABX_ReserveSpace    TAG_USER+72
  172. #define LABX_LabelTable        TAG_USER+98
  173. #define LABX_FirstLine        TAG_USER+152
  174. #define LABX_LastLine        TAG_USER+153
  175. #define LABX_LineTable        TAG_USER+156
  176. #define LABX_Line        TAG_USER+161
  177. #define LABX_LineID        TAG_USER+162
  178. #define LABX_TextPen        TAG_USER+172
  179. #define LABX_BackPen        TAG_USER+173
  180. #define LABX_Spacing        TAG_USER+180
  181.  
  182. /* BUTTON_KIND */
  183. #define LABT_ReturnKey        TAG_USER+34
  184. #define LABT_DefaultButton    TAG_USER+34
  185. #define LABT_EscKey        TAG_USER+56
  186. #define LABT_ExtraFat        TAG_USER+29
  187. #define LABT_Lines        TAG_USER+140
  188. #define LABT_FirstLine        TAG_USER+44
  189. #define LABT_LastLine        TAG_USER+45
  190. #define LABT_DefaultCorrection    TAG_USER+145
  191. #define LABT_Smaller        TAG_USER+147
  192.  
  193. /* CYCLE_KIND */
  194. #define LACY_FirstLabel        TAG_USER+44
  195. #define LACY_LastLabel        TAG_USER+45
  196. #define LACY_LabelTable        TAG_USER+98
  197. #define LACY_AutoPageID        TAG_USER+103
  198. #define LACY_TabKey        TAG_USER+118
  199.  
  200. /* FRACTION_KIND */
  201. #define LAFR_IncrementerHook    TAG_USER+85
  202.  
  203. /* FRAME_KIND */
  204. #define LAFR_InnerWidth        TAG_USER+9
  205. #define LAFR_InnerHeight    TAG_USER+10
  206. #define LAFR_DrawBox        TAG_USER+11
  207. #define LAFR_RefreshHook    TAG_USER+117
  208. #define LAFR_GenerateEvents    TAG_USER+155
  209. #define LAFR_ResizeX        LALV_ResizeX
  210. #define LAFR_ResizeY        LALV_ResizeY
  211.  
  212. /* GAUGE_KIND */
  213. #define LAGA_Percent        TAG_USER+36
  214. #define LAGA_InfoLength        TAG_USER+70
  215. #define LAGA_InfoText        TAG_USER+71
  216. #define LAGA_NoTicks        TAG_USER+143
  217. #define LAGA_Discrete        TAG_USER+144
  218. #define LAGA_Tenth        TAG_USER+144
  219.  
  220. /* IMAGE_KIND */
  221. #define LAIM_Image        TAG_USER+181
  222. #define LAIM_BitMap        TAG_USER+182
  223. #define LAIM_BitMapLeft        TAG_USER+183
  224. #define LAIM_BitMapTop        TAG_USER+184
  225. #define LAIM_BitMapWidth    TAG_USER+185
  226. #define LAIM_BitMapHeight    TAG_USER+186
  227. #define LAIM_BitMapMask        TAG_USER+187
  228.  
  229. /* INTEGER_KIND */
  230. #define LAIN_LastGadget        TAG_USER+28
  231. #define LAIN_Min        TAG_USER+23
  232. #define LAIN_Max        TAG_USER+24
  233. #define LAIN_UseIncrementers    TAG_USER+57
  234. #define LAIN_Incrementers    TAG_USER+57
  235. #define LAIN_HistoryLines    TAG_USER+59
  236. #define LAIN_HistoryHook    TAG_USER+80
  237. #define LAIN_IncrementerHook    TAG_USER+85
  238. #define LAIN_Activate        TAG_USER+148
  239.  
  240. /* LISTVIEW_KIND */
  241. #define LALV_ExtraLabels    TAG_USER+26
  242. #define LALV_Labels        TAG_USER+33
  243. #define LALV_CursorKey        TAG_USER+35
  244. #define LALV_Columns        TAG_USER+2
  245. #define LALV_Lines        TAG_USER+1
  246. #define LALV_Link        TAG_USER+7
  247. #define LALV_FirstLabel        TAG_USER+44
  248. #define LALV_LastLabel        TAG_USER+45
  249. #define LALV_MaxGrowX        TAG_USER+77
  250. #define LALV_MaxGrowY        TAG_USER+78
  251. #define LALV_LabelTable        TAG_USER+98
  252. #define LALV_LockSize        TAG_USER+106
  253. #define LALV_ResizeX        TAG_USER+109
  254. #define LALV_ResizeY        TAG_USER+110
  255. #define LALV_MinChars        TAG_USER+111
  256. #define LALV_MinLines        TAG_USER+112
  257. #define LALV_FlushLabelLeft    TAG_USER+113
  258. #define LALV_TextAttr        TAG_USER+138
  259. #define LALV_AutoPageID        TAG_USER+103
  260. #define LALV_Selected        TAG_USER+167
  261. #define LALV_AdjustForString    TAG_USER+174
  262.  
  263. /* LEVEL_KIND */
  264. #define LAVL_Min        GTSL_Min
  265. #define LAVL_Max        GTSL_Max
  266. #define LAVL_Level        GTSL_Level
  267. #define LAVL_LevelFormat    GTSL_LevelFormat
  268. #define LAVL_LevelPlace        GTSL_LevelPlace
  269. #define LAVL_DispFunc        GTSL_DispFunc
  270. #define LAVL_FullCheck        LASL_FullCheck
  271. #define LAVL_Freedom        TAG_USER+177    /* (I)  New in V41 */
  272. #define LAVL_Ticks        TAG_USER+178    /* (I)  New in V41 */
  273. #define LAVL_NumTicks        TAG_USER+179    /* (IS) New in V41 */
  274. #define LAVL_Lines        TAG_USER+1
  275.  
  276. /* MX_KIND */
  277. #define LAMX_FirstLabel        TAG_USER+44
  278. #define LAMX_LastLabel        TAG_USER+45
  279. #define LAMX_LabelTable        TAG_USER+98
  280. #define LAMX_TabKey        TAG_USER+118
  281. #define LAMX_AutoPageID        TAG_USER+103
  282.  
  283. /* PALETTE_KIND */
  284. #define LAPA_SmallPalette    TAG_USER+32
  285. #define LAPA_Lines        TAG_USER+1
  286. #define LAPA_UsePicker        TAG_USER+137
  287. #define LAPA_Picker        TAG_USER+137
  288.  
  289. /* PASSWORD_KIND */
  290. #define LAPW_String             GTST_String
  291. #define LAPW_LastGadget        TAG_USER+28
  292. #define LAPW_HistoryLines    TAG_USER+59
  293. #define LAPW_HistoryHook    TAG_USER+80
  294. #define LAPW_Activate        TAG_USER+148
  295. #define LAPW_MaxChars        GTST_MaxChars
  296.  
  297. /* POPUP_KIND */
  298. #define LAPU_FirstLabel        TAG_USER+44
  299. #define LAPU_LastLabel        TAG_USER+45
  300. #define LAPU_LabelTable        TAG_USER+98
  301. #define LAPU_AutoPageID        TAG_USER+103
  302. #define LAPU_TabKey        TAG_USER+118
  303. #define LAPU_Labels        GTCY_Labels
  304. #define LAPU_Active        GTCY_Active
  305. #define LAPU_CentreActive    TAG_USER+163
  306.  
  307. /* SLIDER_KIND */
  308. #define LASL_FullCheck        TAG_USER+22
  309.  
  310. /* SCROLLER_KIND */
  311. #define LASC_Thin        TAG_USER+62
  312. #define LASC_FullSize        TAG_USER+188
  313.  
  314. /* STRING_KIND */
  315. #define LAST_LastGadget        TAG_USER+28
  316. #define LAST_Link        TAG_USER+7
  317. #define LAST_Picker        TAG_USER+5
  318. #define LAST_UsePicker        TAG_USER+5
  319. #define LAST_HistoryLines    TAG_USER+59
  320. #define LAST_HistoryHook    TAG_USER+80
  321. #define LAST_CursorPosition    TAG_USER+105
  322. #define LAST_Activate        TAG_USER+148
  323. #define LAST_ValidateHook    TAG_USER+165
  324.  
  325. /* TAB_KIND */
  326. #define LATB_FirstLabel        TAG_USER+44
  327. #define LATB_LastLabel        TAG_USER+45
  328. #define LATB_LabelTable        TAG_USER+98
  329. #define LATB_AutoPageID        TAG_USER+103
  330. #define LATB_TabKey        TAG_USER+118
  331. #define LATB_Labels        GTCY_Labels
  332. #define LATB_Active        GTCY_Active
  333. #define LATB_FullWidth        TAG_USER+149
  334. #define LATB_FullSize        TAG_USER+149
  335.  
  336. /* TAPEDECK_KIND */
  337. #define LATD_ButtonType        TAG_USER+86
  338. #define LATD_Toggle        TAG_USER+87
  339. #define LATD_Pressed        TAG_USER+88
  340. #define LATD_Smaller        TAG_USER+89
  341. #define LATD_Tick        TAG_USER+139
  342.  
  343. /* TEXT_KIND */
  344. #define LATX_Picker        TAG_USER+5
  345. #define LATX_UsePicker        TAG_USER+5
  346. #define LATX_LockSize        TAG_USER+106
  347.  
  348. /* VERTICAL_KIND and HORIZONTAL_KIND */
  349. #define LAGR_Spread        TAG_USER+6
  350. #define LAGR_SameSize        TAG_USER+8
  351. #define LAGR_LastAttributes    TAG_USER+46
  352. #define LAGR_ActivePage        TAG_USER+58
  353. #define LAGR_Frame        TAG_USER+104
  354. #define LAGR_IndentX        TAG_USER+130
  355. #define LAGR_IndentY        TAG_USER+134
  356. #define LAGR_NoIndent        TAG_USER+146
  357. #define LAGR_SameWidth        TAG_USER+150
  358. #define LAGR_SameHeight        TAG_USER+151
  359. #define LAGR_FrameGroup        TAG_USER+168
  360. #define LAGR_AlignRight        TAG_USER+171
  361.  
  362. /* XBAR_KIND */
  363. #define LAXB_FullSize        TAG_USER+50
  364. #define LAXB_FullWidth        TAG_USER+50
  365.  
  366. /* Applicable for layout handle only */
  367. #define LAHN_TextAttr        TAG_USER+41
  368. #define LAHN_AutoActivate    TAG_USER+42
  369. #define LAHN_LocaleHook        TAG_USER+4
  370. #define LAHN_CloningPermitted    TAG_USER+61
  371. #define LAHN_EditHook        TAG_USER+74
  372. #define LAHN_ExactClone        TAG_USER+75
  373. #define LAHN_MenuGlyphs        TAG_USER+76
  374. #define LAHN_Parent        TAG_USER+83
  375. #define LAHN_BlockParent    TAG_USER+84
  376. #define LAHN_SimpleClone    TAG_USER+90
  377. #define LAHN_ExitFlush        TAG_USER+108
  378. #define LAHN_UserData        TAG_USER+116
  379. #define LAHN_RawKeyFilter    TAG_USER+142
  380. #define LAHN_DontPickShortcuts    TAG_USER+154
  381. #define LAHN_NoKeys        TAG_USER+154
  382. #define LAHN_PubScreen        TAG_USER+157
  383. #define LAHN_PubScreenName    TAG_USER+158
  384. #define LAHN_PubScreenFallBack    TAG_USER+159
  385. #define LAHN_CloneScreenTitle    TAG_USER+175
  386. #define LAHN_CloneScreenTitleID    TAG_USER+176
  387. #define LAHN_TopGroupType    TAG_USER+190
  388.  
  389. /* Applicable for menus only. */
  390. #define LAMN_FirstLabel        LABX_FirstLabel
  391. #define LAMN_LastLabel        LABX_LastLabel
  392. #define LAMN_LabelTable        TAG_USER+98
  393. #define LAMN_TitleText        TAG_USER+17000
  394. #define LAMN_TitleID        TAG_USER+17001
  395. #define LAMN_ItemText        TAG_USER+17002
  396. #define LAMN_ItemID        TAG_USER+17003
  397. #define LAMN_SubText        TAG_USER+17004
  398. #define LAMN_SubID        TAG_USER+17005
  399. #define LAMN_KeyText        TAG_USER+17006
  400. #define LAMN_KeyID        TAG_USER+17007
  401. #define LAMN_CommandText    TAG_USER+17008
  402. #define LAMN_CommandID        TAG_USER+17009
  403. #define LAMN_MutualExclude    TAG_USER+17010
  404. #define LAMN_UserData        TAG_USER+17011
  405. #define LAMN_Disabled        TAG_USER+17012
  406. #define LAMN_CheckIt        TAG_USER+17013
  407. #define LAMN_Checked        TAG_USER+17014
  408. #define LAMN_Toggle        TAG_USER+17015
  409. #define LAMN_Code        TAG_USER+17016
  410. #define LAMN_Qualifier        TAG_USER+17017
  411. #define LAMN_Char        TAG_USER+17018
  412. #define LAMN_ID            TAG_USER+17019
  413. #define LAMN_AmigaGlyph        TAG_USER+17020
  414. #define LAMN_CheckmarkGlyph    TAG_USER+17021
  415. #define LAMN_Error        TAG_USER+17022
  416. #define LAMN_Screen        TAG_USER+17023
  417. #define LAMN_TextAttr        TAG_USER+17024
  418. #define LAMN_LayoutHandle    TAG_USER+17025
  419. #define LAMN_Handle        TAG_USER+17025
  420. #define LAMN_ExtraSpace        TAG_USER+17026
  421. #define LAMN_FullMenuNum    TAG_USER+160
  422.  
  423. /* Applicable for window only */
  424. #define LAWN_Menu        TAG_USER+25
  425. #define LAWN_UserPort        TAG_USER+47
  426. #define LAWN_Left        TAG_USER+48
  427. #define LAWN_Top        TAG_USER+49
  428. #define LAWN_Zoom        TAG_USER+50
  429. #define LAWN_MaxPen        TAG_USER+52
  430. #define LAWN_BelowMouse        TAG_USER+53
  431. #define LAWN_MoveToWindow    TAG_USER+54
  432. #define LAWN_AutoRefresh    TAG_USER+55
  433. #define LAWN_HelpHook        TAG_USER+73
  434. #define LAWN_Parent        TAG_USER+81
  435. #define LAWN_BlockParent    TAG_USER+82
  436. #define LAWN_SmartZoom        TAG_USER+91
  437. #define LAWN_Title        TAG_USER+92
  438. #define LAWN_TitleText        TAG_USER+92
  439. #define LAWN_Bounds        TAG_USER+93
  440. #define LAWN_ExtraWidth        TAG_USER+94
  441. #define LAWN_ExtraHeight    TAG_USER+95
  442. #define LAWN_IDCMP        TAG_USER+96
  443. #define LAWN_AlignWindow    TAG_USER+97
  444. #define LAWN_TitleID        TAG_USER+99
  445. #define LAWN_FlushLeft        TAG_USER+14000    /* NOTEZ-BIEN: TAG_USER+99 = WA_Dummy and can clash */
  446. #define LAWN_FlushTop        TAG_USER+14001    /*             with Intuition!                      */
  447. #define LAWN_Show        TAG_USER+14002
  448. #define LAWN_MenuTemplate    TAG_USER+14003
  449. #define LAWN_MenuTags        TAG_USER+14004
  450. #define LAWN_NoInitialRefresh    TAG_USER+164
  451. #define LAWN_LimitWidth        TAG_USER+165
  452. #define LAWN_LimitHeight    TAG_USER+166
  453. #define LAWN_UserData        TAG_USER+169
  454.  
  455. /* Private tags; do not use, or you'll run into trouble! */
  456. #define LA_Private1        TAG_USER+100
  457. #define LA_Private2        TAG_USER+101
  458.  
  459. /* Last tag item value used */
  460. #define LAST_TAG        TAG_USER+190
  461.  
  462.  
  463. /*****************************************************************************/
  464.  
  465.  
  466. /* Identifies the absence of a link for a listview or a string gadget */
  467. #define NIL_LINK (-2)
  468.  
  469.  
  470. /*****************************************************************************/
  471.  
  472.  
  473. /* String gadget type history hook support: you will either get
  474.  * the following value passed as the message parameter to your
  475.  * hook function, or a pointer to a null-terminated string you should
  476.  * copy and create a Node from, which you should then add to the tail
  477.  * of your history list. Place a pointer to your history list in the
  478.  * Hook.h_Data entry.
  479.  */
  480. #define HISTORYHOOK_DiscardOldest (0)
  481.  
  482.  
  483. /*****************************************************************************/
  484.  
  485.  
  486. /* Refresh hook support: you will get the following structure
  487.  * passed as the message and a pointer to the LayoutHandle as
  488.  * the object.
  489.  */
  490. typedef struct RefreshMsg
  491. {
  492.     LONG ID;
  493.     WORD Left;
  494.     WORD Top;
  495.     WORD Width;
  496.     WORD Height;
  497. } RefreshMsg;
  498.  
  499.  
  500. /*****************************************************************************/
  501.  
  502.  
  503. /* Incrementer hook support: you will get the current value
  504.  * passed as the object and one of the following values as
  505.  * the message. Return the number to be used.
  506.  */
  507. enum
  508. {
  509.     INCREMENTERMSG_Decrement = -1,    /* Decrement value */
  510.     INCREMENTERMSG_Initial   =  0,    /* Initial value passed upon gadget creation */
  511.     INCREMENTERMSG_Increment =  1    /* Increment value */
  512. };
  513.  
  514.  
  515. /*****************************************************************************/
  516.  
  517.  
  518. /* Help key hook support: the hook will be called with a "struct IBox *"
  519.  * as the object and a "struct HelpMsg *". The IBox describes the object
  520.  * the mouse was positioned over, such as a button, a listview, etc.
  521.  * The "ObjectID" will indicate the ID of the object the mouse was
  522.  * positioned over. The ID will be -1 if no object was to be found.
  523.  */
  524. typedef struct HelpMsg
  525. {
  526.     struct LayoutHandle *    Handle;        /* Window layout handle */
  527.     LONG            ObjectID;    /* ID of the object, -1 for full window */
  528. } HelpMsg;
  529.  
  530.  
  531. /*****************************************************************************/
  532.  
  533.  
  534. /* This selects whether ticks should be placed next to the body of
  535.  * a LEVEL_KIND object.
  536.  */
  537. enum
  538. {
  539.     TICKS_None  = 0,    /* No ticks please */
  540.     TICKS_Left  = 1,    /* Place ticks left of the slider (FREEVERT only) */
  541.     TICKS_Both  = 2        /* Place ticks on both sides of the slider */
  542. };
  543.  
  544. #define TICKS_Above TICKS_Left    /* Place ticks above the slider (FREEHORIZ only) */
  545.  
  546.  
  547. /*****************************************************************************/
  548.  
  549.  
  550. /* The central data structure of the layout process. */
  551. typedef struct LayoutHandle
  552. {
  553.     struct Screen *        Screen;
  554.     struct DrawInfo *    DrawInfo;
  555.     struct Window *        Window;
  556.     APTR            VisualInfo;
  557.     struct Image *        AmigaGlyph;
  558.     struct Image *        CheckGlyph;
  559.     APTR            UserData;    /* Requires gtlayout.library V9 */
  560.     struct Menu *        Menu;        /* Requires gtlayout.library V13 */
  561.  
  562.     /* Hands off, private fields follow.... */
  563. } LayoutHandle;
  564.  
  565.  
  566. /*****************************************************************************/
  567.  
  568.  
  569. /* Handy for LT_LevelWidth and LT_NewLevelWidth. Note: parameters must be passed
  570.  * over the stack.
  571.  */
  572. typedef LONG (* DISPFUNC)(struct Gadget *gad,LONG value,...);
  573.  
  574.  
  575. /*****************************************************************************/
  576.  
  577.  
  578. /* Useful macros */
  579. #define LT_GetString(Handle,Code)    ((STRPTR)LT_GetAttributesA((Handle),(Code),NULL))
  580.  
  581. #define LAMN_Menu_UserData(m)        (*(APTR *)(((struct Menu *)(m)) + 1))
  582. #define LAMN_Menu_ID(m)            (((ULONG *)(((struct Menu *)(m)) + 1))[1])
  583.  
  584. #define LAMN_Item_UserData(m)        (*(APTR *)(((struct MenuItem *)(m)) + 1))
  585. #define LAMN_Item_ID(m)            (((ULONG *)(((struct MenuItem *)(m)) + 1))[1])
  586.  
  587.  
  588. /*****************************************************************************/
  589.  
  590. #ifdef GTLAYOUT_OBSOLETE
  591. /* Obsolete tags, don't use in new code */
  592. #define LA_Lines        LABX_Rows
  593. #define LA_Spread        LAGR_Spread
  594. #define LA_SameSize        LAGR_SameSize
  595. #define LA_FullCheck        LASL_FullCheck
  596. #define LA_ExtraLabels        LALV_ExtraLabels
  597. #define LA_LastGadget        TAG_USER+28
  598. #define LA_SmallPalette        LAPA_SmallPalette
  599. #define LA_Labels        LALV_Labels
  600. #define LA_Picker        LATX_Picker
  601. #define LA_DrawBox        LAFR_DrawBox
  602. #define LA_FirstLabel        LABX_FirstLabel
  603. #define LA_LastLabel        LABX_LastLabel
  604. #define LA_LabelTable        LABX_LabelTable
  605. #define LA_Min            TAG_USER+23
  606. #define LA_Max            TAG_USER+24
  607. #define LA_Link            LALV_Link
  608. #define LA_Menu            LAWN_Menu
  609. #define LA_HistoryLines        LAST_HistoryLines
  610. #define LA_HistoryHook        LAST_HistoryHook
  611. #define LA_ReturnKey        LABT_ReturnKey
  612. #define LA_ExtraFat        LABT_ExtraFat
  613. #define LA_CursorKey        LALV_CursorKey
  614. #define STORE_BYTE        TAG_USER+63
  615. #define STORE_UBYTE        TAG_USER+64
  616. #define STORE_WORD        TAG_USER+65
  617. #define STORE_BOOL        TAG_USER+65
  618. #define STORE_UWORD        TAG_USER+66
  619. #define STORE_LONG        TAG_USER+67
  620. #define STORE_ULONG        TAG_USER+68
  621. #define STORE_STRPTR        TAG_USER+69
  622. #define LAHN_Font        TAG_USER+41
  623. #define LH_Font            TAG_USER+41
  624. #define LH_AutoActivate        TAG_USER+42
  625. #define LH_LocaleHook        TAG_USER+4
  626. #define LH_CloningPermitted    TAG_USER+61
  627. #define LH_EditHook        TAG_USER+74
  628. #define LH_ExactClone        TAG_USER+75
  629. #define LH_MenuGlyphs        TAG_USER+76
  630. #define LH_Parent        TAG_USER+83
  631. #define LH_BlockParent        TAG_USER+84
  632. #define LH_SimpleClone        TAG_USER+90
  633. #define LH_ExitFlush        TAG_USER+108
  634. #define LH_UserData        TAG_USER+116
  635. #define LH_RawKeyFilter        TAG_USER+142
  636.  
  637.  
  638. /* Obsolete defines, don't use in new code */
  639. #define PLACE_LEFT        PLACE_Left
  640. #define PLACE_RIGHT        PLACE_Right
  641. #define PLACE_ABOVE        PLACE_Above
  642. #define PLACE_IN        PLACE_In
  643. #define PLACE_BELOW        PLACE_Below
  644.  
  645. #define ALIGNTEXT_LEFT        ALIGNTEXT_Left
  646. #define ALIGNTEXT_CENTERED    ALIGNTEXT_Centered
  647. #define ALIGNTEXT_RIGHT        ALIGNTEXT_Right
  648. #define ALIGNTEXT_PAD        ALIGNTEXT_Pad
  649.  
  650. #define TDBT_BACKWARD        TDBT_Backward
  651. #define TDBT_FORWARD        TDBT_Forward
  652. #define TDBT_PREVIOUS        TDBT_Previous
  653. #define TDBT_NEXT        TDBT_Next
  654. #define TDBT_STOP        TDBT_Stop
  655. #define TDBT_PAUSE        TDBT_Pause
  656. #define TDBT_RECORD        TDBT_Record
  657. #define TDBT_REWIND        TDBT_Rewind
  658. #define TDBT_EJECT        TDBT_Eject
  659. #define TDBT_PLAY        TDBT_Play
  660.  
  661. #define ALIGNF_RIGHT        ALIGNF_Right
  662. #define ALIGNF_LEFT        ALIGNF_Left
  663. #define ALIGNF_TOP        ALIGNF_Top
  664. #define ALIGNF_BOTTOM        ALIGNF_Bottom
  665. #define ALIGNF_EXTRA_RIGHT    ALIGNF_ExtraRight
  666. #define ALIGNF_EXTRA_LEFT    ALIGNF_ExtraLeft
  667. #define ALIGNF_EXTRA_TOP    ALIGNF_ExtraTop
  668. #define ALIGNF_EXTRA_BOTTOM    ALIGNF_ExtraBottom
  669.  
  670. #define HISTORYHOOK_DISCARD_OLDEST    HISTORYHOOK_DiscardOldest
  671.  
  672. #define INCREMENTERMSG_DECREMENT    INCREMENTERMSG_Decrement
  673. #define INCREMENTERMSG_INITIAL        INCREMENTERMSG_Initial
  674. #define INCREMENTERMSG_INCREMENT    INCREMENTERMSG_Increment
  675.  
  676. /* Obsolete routines redone as macros. */
  677. #define LT_GetDrawInfo(Handle)        ((Handle != NULL) ? ((Handle)->DrawInfo)    : NULL)
  678. #define LT_GetVisualInfo(Handle)    ((Handle != NULL) ? ((Handle)->VisualInfo)    : NULL)
  679. #define LT_GetScreen(Handle)        ((Handle != NULL) ? ((Handle)->Screen)        : NULL)
  680. #define LT_SetAutoActivate(Handle,Mode)    LT_SetAttributes(Handle,0,LH_AutoActivate,Mode,TAG_DONE)
  681. #endif    /* GTLAYOUT_OBSOLETE */
  682.  
  683. /*****************************************************************************/
  684.  
  685.  
  686. #endif    /* _GTLAYOUT_H */
  687.